package site.suimu.service.impl;

import org.springframework.stereotype.Service;
import site.suimu.mapper.TLikeMapper;
import site.suimu.pojo.TLike;
import site.suimu.service.TLikeService;

import javax.annotation.Resource;
import java.util.List;

@Service
public class TLikeServiceImpl implements TLikeService {

    @Resource
    TLikeMapper tLikeMapper;

    public boolean ins(TLike tLike) {
        if (tLikeMapper.create(tLike)>0){
            return true;
        }
        return false;
    }

    public boolean dle(int id) {
        if (tLikeMapper.delete(id)>0){
            return true;
        }
        return false;
    }

    public List<TLike> sleByUid(int uid) {
        return tLikeMapper.selectByUid(uid);
    }
}
